package com.apes.framework.rop.context;

import com.apes.oap.RopRequestContext;

public class RopContextHolder {

    private static ThreadLocal<RopRequestContext> threadLocalContext = new ThreadLocal<>();


    public static void put(RopRequestContext context) {
        threadLocalContext.set(context);
    }

    public static RopRequestContext get() {
        return threadLocalContext.get();
    }

    /**
     * 调用remove方法能有效的杜绝内存泄露问题
     */
    public static void remove() {
        threadLocalContext.remove();
    }
}
